package com.itheima.mapper;

import com.itheima.dto.StudentAddDto;
import com.itheima.dto.StudentQueryDto;
import com.itheima.pojo.Student;
import com.itheima.vo.StudentVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {

    List<StudentVo> query(StudentQueryDto dto);


    void insert(StudentAddDto student);

    @Delete("delete from student where id=#{id}")
    void deleteid(Integer id);

    @Select("select * from student where id=#{id}")
    Student selectid(Integer id);

    void update(Student student);

    void violation(Integer id,Integer score);
}
